import 'package:json_annotation/json_annotation.dart';

part 'scout_order_list.g.dart';


@JsonSerializable()
class ScoutOrderList extends Object {

  @JsonKey(name: 'code')
  int code;

  @JsonKey(name: 'message')
  String message;

  @JsonKey(name: 'data')
  ScoutOrderListData scoutOrderListData;

  ScoutOrderList(this.code,this.message,this.scoutOrderListData,);

  factory ScoutOrderList.fromJson(Map<String, dynamic> srcJson) => _$ScoutOrderListFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ScoutOrderListToJson(this);

}


@JsonSerializable()
class ScoutOrderListData extends Object {

  @JsonKey(name: 'ret')
  List<ScoutOrderItem> scoutOrderList;

  @JsonKey(name: 'pages')
  Pages pages;

  ScoutOrderListData(this.scoutOrderList,this.pages,);

  factory ScoutOrderListData.fromJson(Map<String, dynamic> srcJson) => _$ScoutOrderListDataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ScoutOrderListDataToJson(this);

}


@JsonSerializable()
class ScoutOrderItem extends Object {

  @JsonKey(name: 'id')
  String id;

  @JsonKey(name: 'order_sn')
  String orderSn;

  @JsonKey(name: 'manager_tel')
  String managerTel;

  @JsonKey(name: 'car_type')
  String carType;

  @JsonKey(name: 'car_name')
  String carName;

  @JsonKey(name: 'car_no')
  String carNo;

  @JsonKey(name: 'report_phone')
  String reportPhone;

  @JsonKey(name: 'created_at')
  String createdAt;

  @JsonKey(name: 'case_type')
  String caseType;

  @JsonKey(name: 'scene_action')
  String sceneAction;

  @JsonKey(name: 'investigator')
  String investigator;

  ScoutOrderItem(this.id,this.orderSn,this.managerTel,this.carType,this.carName,this.carNo,this.reportPhone,this.createdAt,this.caseType,this.sceneAction,this.investigator,);

  factory ScoutOrderItem.fromJson(Map<String, dynamic> srcJson) => _$ScoutOrderItemFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ScoutOrderItemToJson(this);

}


@JsonSerializable()
class Pages extends Object {

  @JsonKey(name: 'count')
  int count;

  @JsonKey(name: 'page_size')
  int pageSize;

  @JsonKey(name: 'page')
  int page;

  Pages(this.count,this.pageSize,this.page,);

  factory Pages.fromJson(Map<String, dynamic> srcJson) => _$PagesFromJson(srcJson);

  Map<String, dynamic> toJson() => _$PagesToJson(this);

}


